-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slightly improve missing property errors #28298
Slightly improve missing property errors #28298
Conversation
cc @DanielRosenwasser who should look over the copy and decide if he likes it~ |
@DanielRosenwasser Fixed~ |
tests/baselines/reference/argumentExpressionContextualTyping.errors.txt
Outdated
Show resolved
Hide resolved
@@ -11,6 +10,6 @@ tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments3.ts(7,35): | |||
|
|||
var d = f(a, b, u2 => u2.b, t2 => t2); | |||
~~ | |||
!!! error TS2322: Type 'A' is not assignable to type 'B'. | |||
!!! error TS2322: Property 'b' is missing in type 'A'. | |||
!!! error TS2737: Property 'b' is missing in type 'A' but present in type 'B'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Part of me feels like we lose some context on why we're reporting the error message when it's the first elaboration.
tests/baselines/reference/thisTypeInFunctionsNegative.errors.txt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but I filed #28491 as a follow-up.
Fixes #26423
Removes a layer from missing property errors that aren't excess property errors and lists multiple properties when multiple properties are missing, up to a limit.